using System;
using System.Collections.Generic;
using NHibernate.Mapping.Attributes;
using A = NHibernate.Mapping.Attributes;

namespace SuperMarketManagement.Entity
{

    [Class(Name = "Shrinkage")]
    public class Shrinkage
    {
        [Id(1, Name = "AutoId"), Generator(2, Class = "native")]
        public virtual long AutoId { get; set; }

        [Property]
        public virtual double Quantity { get; set; }
        [Property]
        public virtual double Cost { get; set; }
        [Property]
        public virtual DateTime ReportedDate { get; set; }

        [ManyToOne(Column = "ProductAutoId")]
        public virtual Product Product { get; set; }

        public Shrinkage()
        {
        }

        public Shrinkage(double quantity, double cost, DateTime reportedDate)
        {
            Quantity = quantity;
            Cost = cost;
            ReportedDate = reportedDate;
        }

    }
}
